home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 271_02 / eraok.doc < prev    next >
Text File  |  1987-08-18  |  934b  |  39 lines

  1.  
  2.  
  3.         NAME
  4.                 eraok -- ask permission before overwriting existing file
  5.  
  6.         SYNOPSIS
  7.                 void eraok(filename);
  8.                 char *filename  filename to test
  9.  
  10.         DESCRIPTION
  11.         This function checks for the existance of the specified filename
  12.         and if it exists, will ask the user (through stderr) if the file
  13.         can be lost.  If the user responds Y or y, the file is lost and
  14.         return is made to the caller.  If the response is anything else,
  15.         the program aborts immediately, and the routine does NOT return
  16.         to the caller.  Exit is via the aabort() function of this library.
  17.  
  18.         EXAMPLE
  19.              (assume argv[1] is string "foobar.com")
  20.  
  21.              eraok(argv[1]);
  22.              printf("File %s has been deleted", argv[1]);
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.         This function is found in SMTCx.LIB for the Turbo-C Compiler.
  39.